OpenShadingLanguage 1.00
# Compiled by oslc 1.10.10
# options: -q -O2 -I/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders -I/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders -o /home/sources/buildbot-worker-linux_centos7/linux_290/build/intern/cycles/kernel/shaders/node_anisotropic_bsdf.oso
shader node_anisotropic_bsdf
param	color	Color	0 0 0		%read{75,89} %write{2147483647,-1}
param	string	distribution	"GGX"		%read{71,84} %write{2147483647,-1}
param	float	Roughness	0		%read{57,57} %write{2147483647,-1}
param	float	Anisotropy	0		%read{59,59} %write{2147483647,-1}
param	float	Rotation	0		%read{3,5} %write{2147483647,-1}
param	normal	Normal	0 0 0		%read{7,88} %write{0,0} %initexpr
param	normal	Tangent	0 0 0		%read{2,2} %write{1,1} %initexpr
oparam	closure color	BSDF			%read{2147483647,-1} %write{75,89}
global	normal	N	%read{0,0} %write{2147483647,-1}
global	vector	dPdu	%read{1,1} %write{2147483647,-1}
local	vector	___252_axis	%read{11,13} %write{8,8}
local	float	___252_cosang	%read{10,51} %write{9,9}
local	float	___252_sinang	%read{21,46} %write{9,9}
local	float	___252_cosang1	%read{20,45} %write{10,10}
local	float	___252_x	%read{14,46} %write{11,11}
local	float	___252_y	%read{19,44} %write{12,12}
local	float	___252_z	%read{21,49} %write{13,13}
local	matrix	___252_M	%read{55,55} %write{53,53}
local	vector	T	%read{54,88} %write{2,56}
local	float	roughness	%read{64,70} %write{57,57}
local	float	roughness_u	%read{78,88} %write{64,68}
local	float	roughness_v	%read{78,88} %write{66,70}
local	float	aniso	%read{61,69} %write{60,60}
const	float	$const1	0		%read{3,74} %write{2147483647,-1}
temp	int	$tmp1	%read{4,4} %write{3,3}
const	float	$const2	6.28318548		%read{5,5} %write{2147483647,-1}
temp	float	$tmp2	%read{9,9} %write{5,5}
const	point	$const3	0 0 0		%read{7,56} %write{2147483647,-1}
const	string	$const4	"rotate"		%read{6,6} %write{2147483647,-1}
temp	vector	$tmp4	%read{8,8} %write{7,7}
const	float	$const5	1		%read{10,69} %write{2147483647,-1}
const	int	$const6	0		%read{11,11} %write{2147483647,-1}
const	int	$const7	1		%read{12,12} %write{2147483647,-1}
const	int	$const8	2		%read{13,13} %write{2147483647,-1}
temp	float	$tmp5	%read{18,18} %write{14,14}
temp	float	$tmp6	%read{16,16} %write{15,15}
temp	float	$tmp7	%read{17,17} %write{16,16}
temp	float	$tmp8	%read{18,18} %write{17,17}
temp	float	$tmp9	%read{53,53} %write{18,18}
temp	float	$tmp10	%read{20,20} %write{19,19}
temp	float	$tmp11	%read{22,22} %write{20,20}
temp	float	$tmp12	%read{22,22} %write{21,21}
temp	float	$tmp13	%read{53,53} %write{22,22}
temp	float	$tmp14	%read{24,24} %write{23,23}
temp	float	$tmp15	%read{26,26} %write{24,24}
temp	float	$tmp16	%read{26,26} %write{25,25}
temp	float	$tmp17	%read{53,53} %write{26,26}
temp	float	$tmp18	%read{28,28} %write{27,27}
temp	float	$tmp19	%read{30,30} %write{28,28}
temp	float	$tmp20	%read{30,30} %write{29,29}
temp	float	$tmp21	%read{53,53} %write{30,30}
temp	float	$tmp22	%read{35,35} %write{31,31}
temp	float	$tmp23	%read{33,33} %write{32,32}
temp	float	$tmp24	%read{34,34} %write{33,33}
temp	float	$tmp25	%read{35,35} %write{34,34}
temp	float	$tmp26	%read{53,53} %write{35,35}
temp	float	$tmp27	%read{37,37} %write{36,36}
temp	float	$tmp28	%read{39,39} %write{37,37}
temp	float	$tmp29	%read{39,39} %write{38,38}
temp	float	$tmp30	%read{53,53} %write{39,39}
temp	float	$tmp31	%read{41,41} %write{40,40}
temp	float	$tmp32	%read{43,43} %write{41,41}
temp	float	$tmp33	%read{43,43} %write{42,42}
temp	float	$tmp34	%read{53,53} %write{43,43}
temp	float	$tmp35	%read{45,45} %write{44,44}
temp	float	$tmp36	%read{47,47} %write{45,45}
temp	float	$tmp37	%read{47,47} %write{46,46}
temp	float	$tmp38	%read{53,53} %write{47,47}
temp	float	$tmp39	%read{52,52} %write{48,48}
temp	float	$tmp40	%read{50,50} %write{49,49}
temp	float	$tmp41	%read{51,51} %write{50,50}
temp	float	$tmp42	%read{52,52} %write{51,51}
temp	float	$tmp43	%read{53,53} %write{52,52}
temp	vector	$tmp44	%read{56,56} %write{55,55}
temp	vector	$tmp45	%read{55,55} %write{54,54}
const	float	$const9	-0.99000001		%read{60,60} %write{2147483647,-1}
const	float	$const10	0.99000001		%read{59,59} %write{2147483647,-1}
const	string	$const11	"clamp"		%read{58,58} %write{2147483647,-1}
temp	float	$tmp46	%read{60,60} %write{59,59}
temp	int	$tmp47	%read{62,62} %write{61,61}
temp	float	$tmp48	%read{64,64} %write{63,63}
temp	float	$tmp49	%read{66,66} %write{65,65}
temp	float	$tmp50	%read{68,68} %write{67,67}
temp	float	$tmp51	%read{70,70} %write{69,69}
const	string	$const12	"sharp"		%read{71,71} %write{2147483647,-1}
temp	int	$tmp52	%read{72,72} %write{71,71}
temp	closure color	$tmp53	%read{75,75} %write{74,74}
const	string	$const13	"reflection"		%read{73,74} %write{2147483647,-1}
const	string	$const14	"beckmann"		%read{76,76} %write{2147483647,-1}
temp	int	$tmp54	%read{77,77} %write{76,76}
temp	closure color	$tmp55	%read{79,79} %write{78,78}
const	string	$const15	"microfacet_beckmann_aniso"		%read{78,78} %write{2147483647,-1}
const	string	$const16	"GGX"		%read{80,80} %write{2147483647,-1}
temp	int	$tmp56	%read{81,81} %write{80,80}
temp	closure color	$tmp57	%read{83,83} %write{82,82}
const	string	$const17	"microfacet_ggx_aniso"		%read{82,82} %write{2147483647,-1}
const	string	$const18	"Multiscatter GGX"		%read{84,84} %write{2147483647,-1}
temp	int	$tmp58	%read{85,85} %write{84,84}
temp	closure color	$tmp59	%read{87,87} %write{86,86}
const	string	$const19	"microfacet_multi_ggx_aniso"		%read{86,86} %write{2147483647,-1}
temp	closure color	$tmp60	%read{89,89} %write{88,88}
const	string	$const20	"ashikhmin_shirley"		%read{88,88} %write{2147483647,-1}
code Normal
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:23
#                              normal Normal = N,
	assign		Normal N 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl"} %line{23} %argrw{"wr"}
code Tangent
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:24
#                              normal Tangent = normalize(dPdu),
	normalize	Tangent dPdu 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl"} %line{24} %argrw{"wr"}
code ___main___
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:28
#   vector T = Tangent;
	assign		T Tangent 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl"} %line{28} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:30
#   if (Rotation != 0.0)
	neq		$tmp1 Rotation $const1 	%line{30} %argrw{"wrr"}
	if		$tmp1 57 57 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:31
#     T = rotate(T, Rotation * M_2PI, point(0.0, 0.0, 0.0), Normal);
	mul		$tmp2 Rotation $const2 	%line{31} %argrw{"wrr"}
	functioncall	$const4 57 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:292
#     vector axis = normalize (b - a);
	sub		$tmp4 Normal $const3 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h"} %line{292} %argrw{"wrr"}
	normalize	___252_axis $tmp4 	%argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:294
#     sincos (angle, sinang, cosang);
	sincos		$tmp2 ___252_sinang ___252_cosang 	%line{294} %argrw{"rww"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:295
#     float cosang1 = 1.0 - cosang;
	sub		___252_cosang1 $const5 ___252_cosang 	%line{295} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:296
#     float x = axis[0], y = axis[1], z = axis[2];
	compref		___252_x ___252_axis $const6 	%line{296} %argrw{"wrr"}
	compref		___252_y ___252_axis $const7 	%argrw{"wrr"}
	compref		___252_z ___252_axis $const8 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:297
#     matrix M = matrix (x * x + (1.0 - x * x) * cosang,
	mul		$tmp5 ___252_x ___252_x 	%line{297} %argrw{"wrr"}
	mul		$tmp6 ___252_x ___252_x 	%argrw{"wrr"}
	sub		$tmp7 $const5 $tmp6 	%argrw{"wrr"}
	mul		$tmp8 $tmp7 ___252_cosang 	%argrw{"wrr"}
	add		$tmp9 $tmp5 $tmp8 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:298
#                        x * y * cosang1 + z * sinang,
	mul		$tmp10 ___252_x ___252_y 	%line{298} %argrw{"wrr"}
	mul		$tmp11 $tmp10 ___252_cosang1 	%argrw{"wrr"}
	mul		$tmp12 ___252_z ___252_sinang 	%argrw{"wrr"}
	add		$tmp13 $tmp11 $tmp12 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:299
#                        x * z * cosang1 - y * sinang,
	mul		$tmp14 ___252_x ___252_z 	%line{299} %argrw{"wrr"}
	mul		$tmp15 $tmp14 ___252_cosang1 	%argrw{"wrr"}
	mul		$tmp16 ___252_y ___252_sinang 	%argrw{"wrr"}
	sub		$tmp17 $tmp15 $tmp16 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:301
#                        x * y * cosang1 - z * sinang,
	mul		$tmp18 ___252_x ___252_y 	%line{301} %argrw{"wrr"}
	mul		$tmp19 $tmp18 ___252_cosang1 	%argrw{"wrr"}
	mul		$tmp20 ___252_z ___252_sinang 	%argrw{"wrr"}
	sub		$tmp21 $tmp19 $tmp20 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:302
#                        y * y + (1.0 - y * y) * cosang,
	mul		$tmp22 ___252_y ___252_y 	%line{302} %argrw{"wrr"}
	mul		$tmp23 ___252_y ___252_y 	%argrw{"wrr"}
	sub		$tmp24 $const5 $tmp23 	%argrw{"wrr"}
	mul		$tmp25 $tmp24 ___252_cosang 	%argrw{"wrr"}
	add		$tmp26 $tmp22 $tmp25 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:303
#                        y * z * cosang1 + x * sinang,
	mul		$tmp27 ___252_y ___252_z 	%line{303} %argrw{"wrr"}
	mul		$tmp28 $tmp27 ___252_cosang1 	%argrw{"wrr"}
	mul		$tmp29 ___252_x ___252_sinang 	%argrw{"wrr"}
	add		$tmp30 $tmp28 $tmp29 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:305
#                        x * z * cosang1 + y * sinang,
	mul		$tmp31 ___252_x ___252_z 	%line{305} %argrw{"wrr"}
	mul		$tmp32 $tmp31 ___252_cosang1 	%argrw{"wrr"}
	mul		$tmp33 ___252_y ___252_sinang 	%argrw{"wrr"}
	add		$tmp34 $tmp32 $tmp33 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:306
#                        y * z * cosang1 - x * sinang,
	mul		$tmp35 ___252_y ___252_z 	%line{306} %argrw{"wrr"}
	mul		$tmp36 $tmp35 ___252_cosang1 	%argrw{"wrr"}
	mul		$tmp37 ___252_x ___252_sinang 	%argrw{"wrr"}
	sub		$tmp38 $tmp36 $tmp37 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:307
#                        z * z + (1.0 - z * z) * cosang,
	mul		$tmp39 ___252_z ___252_z 	%line{307} %argrw{"wrr"}
	mul		$tmp40 ___252_z ___252_z 	%argrw{"wrr"}
	sub		$tmp41 $const5 $tmp40 	%argrw{"wrr"}
	mul		$tmp42 $tmp41 ___252_cosang 	%argrw{"wrr"}
	add		$tmp43 $tmp39 $tmp42 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:297
#     matrix M = matrix (x * x + (1.0 - x * x) * cosang,
	matrix		___252_M $tmp9 $tmp13 $tmp17 $const1 $tmp21 $tmp26 $tmp30 $const1 $tmp34 $tmp38 $tmp43 $const1 $const1 $const1 $const1 $const5 	%line{297} %argrw{"wrrrrrrrrrrrrrrrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:310
#     return transform (M, p-a) + a;
	sub		$tmp45 T $const3 	%line{310} %argrw{"wrr"}
	transformv	$tmp44 ___252_M $tmp45 	%argrw{"wrr"}
	add		T $tmp44 $const3 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:34
#   float roughness = Roughness * Roughness;
	mul		roughness Roughness Roughness 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl"} %line{34} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:36
#   float aniso = clamp(Anisotropy, -0.99, 0.99);
	functioncall	$const11 61 	%line{36} %argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:163
# float  clamp (float x, float minval, float maxval) { return max(min(x,maxval),minval); }
	min		$tmp46 Anisotropy $const10 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h"} %line{163} %argrw{"wrr"}
	max		aniso $tmp46 $const9 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:38
#   if (aniso < 0.0) {
	lt		$tmp47 aniso $const1 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl"} %line{38} %argrw{"wrr"}
	if		$tmp47 67 71 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:39
#     roughness_u = roughness / (1.0 + aniso);
	add		$tmp48 $const5 aniso 	%line{39} %argrw{"wrr"}
	div		roughness_u roughness $tmp48 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:40
#     roughness_v = roughness * (1.0 + aniso);
	add		$tmp49 $const5 aniso 	%line{40} %argrw{"wrr"}
	mul		roughness_v roughness $tmp49 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:43
#     roughness_u = roughness * (1.0 - aniso);
	sub		$tmp50 $const5 aniso 	%line{43} %argrw{"wrr"}
	mul		roughness_u roughness $tmp50 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:44
#     roughness_v = roughness / (1.0 - aniso);
	sub		$tmp51 $const5 aniso 	%line{44} %argrw{"wrr"}
	div		roughness_v roughness $tmp51 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:47
#   if (distribution == "sharp")
	eq		$tmp52 distribution $const12 	%line{47} %argrw{"wrr"}
	if		$tmp52 76 90 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:48
#     BSDF = Color * reflection(Normal);
	functioncall	$const13 75 	%line{48} %argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:488
# closure color reflection(normal N) { return reflection (N, 0.0); }
	closure		$tmp53 $const13 Normal $const1 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h"} %line{488} %argrw{"wrrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:48
#     BSDF = Color * reflection(Normal);
	mul		BSDF $tmp53 Color 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl"} %line{48} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:49
#   else if (distribution == "beckmann")
	eq		$tmp54 distribution $const14 	%line{49} %argrw{"wrr"}
	if		$tmp54 80 90 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:50
#     BSDF = Color * microfacet_beckmann_aniso(Normal, T, roughness_u, roughness_v);
	closure		$tmp55 $const15 Normal T roughness_u roughness_v 	%line{50} %argrw{"wrrrrr"}
	mul		BSDF $tmp55 Color 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:51
#   else if (distribution == "GGX")
	eq		$tmp56 distribution $const16 	%line{51} %argrw{"wrr"}
	if		$tmp56 84 90 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:52
#     BSDF = Color * microfacet_ggx_aniso(Normal, T, roughness_u, roughness_v);
	closure		$tmp57 $const17 Normal T roughness_u roughness_v 	%line{52} %argrw{"wrrrrr"}
	mul		BSDF $tmp57 Color 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:53
#   else if (distribution == "Multiscatter GGX")
	eq		$tmp58 distribution $const18 	%line{53} %argrw{"wrr"}
	if		$tmp58 88 90 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:54
#     BSDF = Color * microfacet_multi_ggx_aniso(Normal, T, roughness_u, roughness_v, Color);
	closure		$tmp59 $const19 Normal T roughness_u roughness_v Color 	%line{54} %argrw{"wrrrrrr"}
	mul		BSDF $tmp59 Color 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl:56
#     BSDF = Color * ashikhmin_shirley(Normal, T, roughness_u, roughness_v);
	closure		$tmp60 $const20 Normal T roughness_u roughness_v 	%line{56} %argrw{"wrrrrr"}
	mul		BSDF $tmp60 Color 	%argrw{"wrr"}
	end
